<template>
    <div class="">
        <el-container>
            <el-header  
            height="10vh"
            >xxx大型后台管理系统
            <div class="box">欢迎{{ $store.getters.getUser.username }}回家</div>
            <div>
          <el-button type="danger" size="small" @click="loginout">退出</el-button>
        </div>
        </el-header>
            <el-container>
                <el-aside width="260px">
                    <!-- <el-menu default-active="5" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b"
                        unique-opened>

                        <el-menu-item index="5">
                            <i class="el-icon-menu"></i>
                            <span slot="title">首页</span>
                        </el-menu-item>
                        <el-submenu index="1">
                            <template slot="title">
                                <i class="el-icon-setting"></i>
                                <span>系统管理</span>
                            </template>
                            <el-menu-item index="1-4-1">菜单管理</el-menu-item>
                        </el-submenu>
                        <el-submenu index="2">
                            <template slot="title">
                                <i class="el-icon-goods"></i>
                                <span>商城管理</span>
                            </template>
                            <el-menu-item index="2-4-1">商品管理</el-menu-item>
                        </el-submenu>
                       
                    </el-menu> -->
                    <v-nav></v-nav>

                </el-aside>
                <el-main>
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script>
import vNav from '../components/vNav.vue'
export default {
    data() {
        return {

        }
    },
    components: {
        vNav
    },
    methods:{
        loginout(){
            this.$store.dispatch('changeUserAction',false)
            this.$router.push('/login')
        }
    }
}
</script>
<style>
.el-header {
    background-color: rgba(81,142,203);

    color: white;
}
.box{
    color: #ccc;
}
</style>